Skip to content

Conversation

@benediktibk
Copy link
Contributor

Implement the readout protection functions for the STM32F7.

@benediktibk benediktibk force-pushed the stm32f7_rdp branch 2 times, most recently from df67ec8 to 00cb77f Compare July 19, 2024 12:12
@benediktibk benediktibk marked this pull request as ready for review July 22, 2024 06:20
@FRASTM
Copy link
Contributor

FRASTM commented Jul 26, 2024

thanks @benediktibk to add this for the stm32F7.

Recently there was a similar question for the stm32h7 serie here #76297
Does it make sense to extend this PR to the stm32H7 serie ?
The stm32H7 flash registers do not have exactly the same mapping as the stm32F7. In any case that could be a next PR to come just after that one is merged.

Copy link
Contributor

@FRASTM FRASTM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
did you run any test with CONFIG_FLASH_STM32_READOUT_PROTECTION set ?
(of course changing the RDP might be ... definitive, to be handled with care or simulated)

@benediktibk
Copy link
Contributor Author

LGTM
did you run any test with CONFIG_FLASH_STM32_READOUT_PROTECTION set ?
(of course changing the RDP might be ... definitive, to be handled with care or simulated)

Yes, I ran tests with changes between RDP level 0 and 1, none with 2. For obvious reasons.

@benediktibk
Copy link
Contributor Author

thanks @benediktibk to add this for the stm32F7.

Recently there was a similar question for the stm32h7 serie here #76297
Does it make sense to extend this PR to the stm32H7 serie ?
The stm32H7 flash registers do not have exactly the same mapping as the stm32F7. In any case that could be a next PR to come just after that one is merged.

I'll look into it, but I won't be able to test it on hardware.

@FRASTM
Copy link
Contributor

FRASTM commented Jul 31, 2024

thanks @benediktibk to add this for the stm32F7.
Recently there was a similar question for the stm32h7 serie here #76297
Does it make sense to extend this PR to the stm32H7 serie ?
The stm32H7 flash registers do not have exactly the same mapping as the stm32F7. In any case that could be a next PR to come just after that one is merged.

I'll look into it, but I won't be able to test it on hardware.

Thanks for adding this serie.

thanks @benediktibk to add this for the stm32F7.
Recently there was a similar question for the stm32h7 serie here #76297
Does it make sense to extend this PR to the stm32H7 serie ?
The stm32H7 flash registers do not have exactly the same mapping as the stm32F7. In any case that could be a next PR to come just after that one is merged.

I'll look into it, but I won't be able to test it on hardware.

I have tested on stm32h750b_dk board
I am afraid this is not as simple as I expected. I realize, the flash driver for stm32h7 is apart from other stm32 series. It does not include (build) the flash_stm32_ex_op.c nor flash_stm32.c (see drivers/flash/CMakeLists.txt)
Consequently the stm32h7_flash driver probably needs more than
the api function .ex_op = flash_stm32_ex_op, or .ex_op = flash_stm32h7_ex_op but also either re-defining the flash_stm32_ex_op.c or a new flash_stm32h7_ex_op.c. This has to be studied further.
Sorry for that, maybe in the end we better have a dedicated PR if that one is going too far in changes for stm32H7

@FRASTM
Copy link
Contributor

FRASTM commented Aug 2, 2024

I took your commit f2fe52c7d04f7d8682c2067887fc32b17f46fe4f and applied the model to the stm32h7 : this gives #76640

@benediktibk
Copy link
Contributor Author

Thanks @FRASTM, I've removed the two commits for the H7 from this PR again.

Reduce the redundancy in the readout protection implementation
on STM32 MCUs.

Signed-off-by: Benedikt Schmidt <[email protected]>
Implement the readout protection for the STM32F7 series.

Signed-off-by: Benedikt Schmidt <[email protected]>
Add the nucleo_f746zg to the tests for the flash driver.

Signed-off-by: Benedikt Schmidt <[email protected]>
@benediktibk benediktibk requested a review from de-nordic August 7, 2024 07:27
@nashif nashif merged commit d561b50 into zephyrproject-rtos:main Aug 7, 2024
@benediktibk benediktibk deleted the stm32f7_rdp branch August 20, 2024 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants